package java67_12;

public class PhoneTest {

	public static void main(String[] args) {
		MobilePhone p = new MobilePhone();
		p.price = 4999;
		p.brand = "华为荣耀p40";
		p.color = "狗屎黄";
		// !!!!第一种
		// p.dianchi.brand = "华为原装电池";
		// p.dianchi.vol = 10000;
		// 第二种
		Battery b2 = new Battery();
		b2.brand = "飞毛腿散装系列";
		b2.vol = 100000000;
		// b2.show();
		// Very important
		p.dianchi = b2;// 电池安装到手机上
		p.show();
		Battery b3 = new Battery();
		b3.brand = "大力牌电池";
		b3.vol = 5000;
		p.dianchi = b3;// 换了一块
		System.out.println(">>>>>>>>>>>>>>>>>>...");
		p.show();
	}
}
